package com.blackbox.price.configuration;


import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * @Author: TWQ
 * @Description:
 * @Date: Created in 2020-08-08 8:54
 * @Modidied By:
 * @Version
 */
public class VisionRecords<T> {

    public static final String PAGESIZE = "pageSize";
    public static final String PAGENO = "pageNo";



    private List<T> list;// 返回数据
    private long total;// 记录总数
    private long pageNum;// 页码
    private long pageSize;// 每页记录行数
    private long pages;// 总页数

    public static VisionRecords pageHelper(PageInfo of) {
       return   new VisionRecords(of.getList(),of.getTotal(),of.getPageNum(),of.getPageSize(),of.getPages());
    }

    public VisionRecords(List<T> list, long total, long pageNum, long pageSize, long pages) {
        this.list = list;
        this.total = total;
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.pages = pages;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public long getPageNum() {
        return pageNum;
    }

    public void setPageNum(long pageNum) {
        this.pageNum = pageNum;
    }

    public long getPageSize() {
        return pageSize;
    }

    public void setPageSize(long pageSize) {
        this.pageSize = pageSize;
    }

    public long getPages() {
        return pages;
    }

    public void setPages(long pages) {
        this.pages = pages;
    }
}
